package com.bw.task.adapter;

import android.widget.ImageView;


import com.bumptech.glide.Glide;
import com.bw.task.R;
import com.bw.task.bean.Vodiobean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class MyVodioAdapter extends BaseQuickAdapter<Vodiobean.DataBean, BaseViewHolder> {
    public MyVodioAdapter(int layoutResId, @Nullable List<Vodiobean.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, Vodiobean.DataBean dataBean) {
        MyStandardGSYVideoPlayer view = baseViewHolder.getView(R.id.myplayer);
        view.setUp(dataBean.getVideopath(),true,"");


        ImageView imageView = new ImageView(getContext());
        Glide.with(getContext()).load(dataBean.getVideomainimg()).into(imageView);
        view.setThumbImageView(imageView);

        //view.startPlayLogic();
    }
}
